package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

/*退款*/

@Entity
public class Tuikuan {
    private int tkId;//退款id
    private Timestamp tkTime;//退款时间
    private BigDecimal tkMoney;//退款金额
    private String tkFanshi;//退款方式
    private String tkBeizhu;//退款备注
    private Tuihuo tuihuoByThId;//退货对象（退货id）
    private Kehu kH;//客户对象（客户id）
    private String tkPeople;

    @Column(name = "tk_people")
    public String getTkPeople() {
        return tkPeople;
    }

    public void setTkPeople(String tkPeople) {
        this.tkPeople = tkPeople;
    }

    @Id
    @Column(name = "tk_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getTkId() {
        return tkId;
    }

    public void setTkId(int tkId) {
        this.tkId = tkId;
    }


    @Basic
    @Column(name = "tk_time", nullable = false)
    public Timestamp getTkTime() {
        return tkTime;
    }

    public void setTkTime(Timestamp tkTime) {
        this.tkTime = tkTime;
    }

    @Basic
    @Column(name = "tk_money", nullable = true, precision = 2)
    public BigDecimal getTkMoney() {
        return tkMoney;
    }

    public void setTkMoney(BigDecimal tkMoney) {
        this.tkMoney = tkMoney;
    }

    @Basic
    @Column(name = "tk_fanshi", nullable = true, length = 200)
    public String getTkFanshi() {
        return tkFanshi;
    }

    public void setTkFanshi(String tkFanshi) {
        this.tkFanshi = tkFanshi;
    }

    @Basic
    @Column(name = "tk_beizhu", nullable = true, length = 200)
    public String getTkBeizhu() {
        return tkBeizhu;
    }

    public void setTkBeizhu(String tkBeizhu) {
        this.tkBeizhu = tkBeizhu;
    }


    @ManyToOne
    @JoinColumn(name = "th_id", referencedColumnName = "th_id")
    public Tuihuo getTuihuoByThId() {
        return tuihuoByThId;
    }

    public void setTuihuoByThId(Tuihuo tuihuoByThId) {
        this.tuihuoByThId = tuihuoByThId;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }
}
